import request from '@/utils/request'

// 查询请假申请列表
export function listRequests(query) {
  return request({
    url: '/attendance/requests/list',
    method: 'get',
    params: query
  })
}

// 查询请假申请详细
export function getRequests(overtimeId) {
  return request({
    url: '/attendance/requests/' + overtimeId,
    method: 'get'
  })
}

// 新增请假申请
export function addRequests(data) {
  return request({
    url: '/attendance/requests',
    method: 'post',
    data: data
  })
}

// 修改请假申请
export function updateRequests(data) {
  return request({
    url: '/attendance/requests',
    method: 'put',
    data: data
  })
}

// 删除请假申请
export function delRequests(overtimeId) {
  return request({
    url: '/attendance/requests/' + overtimeId,
    method: 'delete'
  })
}
